package qianting.news.wemedia.feign;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import qianting.news.apis.services.wemedia.IWemediaClient;
import qianting.news.common.entity.State;
import qianting.news.wemedia.service.WmChannelService;

@Api(tags = "api管理")
@RestController()
@RequestMapping("/api")
public class WemediaClient implements IWemediaClient {

    @Autowired
    private WmChannelService wmChannelService;

    @ApiOperation(value = "查询所有频道")
    @GetMapping("/channel/list")
    @Override
    public State getChannels() {
        return wmChannelService.findAll();
    }

}